package com.ruoyi.face.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

public class CustomizeVoices {

    private boolean enable;

    @JsonProperty(value = "customize_list")
    private List<CustomizeVoice> list = new ArrayList<>();

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public List<CustomizeVoice> getList() {
        return list;
    }

    public void setList(List<CustomizeVoice> list) {
        this.list = list;
    }

    public void addCustomizeVoice(String businessCode, String message, Integer audioId) {
        list.add(new CustomizeVoice(businessCode, message, audioId));
    }

    private class CustomizeVoice {

        @JsonProperty("business_code")
        private String businessCode;

        private String message;

        @JsonProperty(value = "audio_id")
        private Integer audioId = 0;

        public CustomizeVoice(String businessCode, String message, Integer audioId) {
            this.businessCode = businessCode;
            this.message = message;
            this.audioId = audioId;
        }

        public String getBusinessCode() {
            return businessCode;
        }

        public void setBusinessCode(String businessCode) {
            this.businessCode = businessCode;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public Integer getAudioId() {
            return audioId;
        }

        public void setAudioId(Integer audioId) {
            this.audioId = audioId;
        }
    }
}
